package com.raven.craft.code.generator.common.constant;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author raven
 * @date 2019-03-24 19:43
 */
@Getter
@AllArgsConstructor
public enum Nullable implements BaseEnum<String> {

    YES("YES"),
    NO("NO"),
    ;

    @JsonValue
    @EnumValue
    private final String code;

    public Boolean isNullable() {
        return YES.equals(this);
    }
}
